package com.baor.dao;

import com.baor.domain.DistributorVo;
import com.github.yulichang.base.mapper.MPJJoinMapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public interface DistributorDao extends MPJJoinMapper<DistributorVo> {

    @Update("update t_distributor set distribution_level_id = #{new} where user_id in  (select * from (select user_id from t_distributor where distribution_level_id = #{old}) as a)")
    Integer updateGrade(Map<String, Object> map);

//    @Update("update t_distributor set total_distribution = total_distribution+#{changeMoney} where distributor_id = #{distributorId}")
//    Integer updateDisMoney(Map<String, Object> map);
}
